package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ConstractOwnerMapper;
import com.ruoyi.system.domain.ConstractOwner;
import com.ruoyi.system.service.IConstractOwnerService;
import com.ruoyi.common.core.text.Convert;

/**
 * 业主管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-04
 */
@Service("owner")
public class ConstractOwnerServiceImpl implements IConstractOwnerService 
{
    @Autowired
    private ConstractOwnerMapper constractOwnerMapper;

    /**
     * 查询业主管理
     * 
     * @param id 业主管理主键
     * @return 业主管理
     */
    @Override
    public ConstractOwner selectConstractOwnerById(Long id)
    {
        return constractOwnerMapper.selectConstractOwnerById(id);
    }

    /**
     * 查询业主管理列表
     * 
     * @param constractOwner 业主管理
     * @return 业主管理
     */
    @Override
    public List<ConstractOwner> selectConstractOwnerList(ConstractOwner constractOwner)
    {
        return constractOwnerMapper.selectConstractOwnerList(constractOwner);
    }

    @Override
    public List<ConstractOwner> selectOwnerList()
    {
        ConstractOwner constractOwner = new ConstractOwner();
        return constractOwnerMapper.selectConstractOwnerList(constractOwner);
    }

    /**
     * 新增业主管理
     * 
     * @param constractOwner 业主管理
     * @return 结果
     */
    @Override
    public int insertConstractOwner(ConstractOwner constractOwner)
    {
        return constractOwnerMapper.insertConstractOwner(constractOwner);
    }

    /**
     * 修改业主管理
     * 
     * @param constractOwner 业主管理
     * @return 结果
     */
    @Override
    public int updateConstractOwner(ConstractOwner constractOwner)
    {
        return constractOwnerMapper.updateConstractOwner(constractOwner);
    }

    /**
     * 批量删除业主管理
     * 
     * @param ids 需要删除的业主管理主键
     * @return 结果
     */
    @Override
    public int deleteConstractOwnerByIds(String ids)
    {
        return constractOwnerMapper.deleteConstractOwnerByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除业主管理信息
     * 
     * @param id 业主管理主键
     * @return 结果
     */
    @Override
    public int deleteConstractOwnerById(Long id)
    {
        return constractOwnerMapper.deleteConstractOwnerById(id);
    }
}
